<?xml version="1.0" encoding="utf-8" ?> 
<taskrunner name="check.installed.version" version="1.0" date="2008-10-30" maxthreads="1">

	<!-- checks installed version. 
    log:
    2008-10-28/MMA  Added task SetKeepLocalDbFalse. This is the default value. 
  -->
  
	
	<includes>
		<file name="vida.install.settings.xml" />
	</includes> 
  
  <tasks>

    <task name="SetKeepLocalDbFalse" typename="@SetGlobalProperty">
      <description>
        Sets the global property KeepLocalDb to false. This value can be changed
        later by task "get.installed.version"
      </description>
      <dependencies list=""/>
      <parameters>
        <parameter name="property.name" value="KeepLocalDb"/>
        <parameter name="property.value" value="false"/>
      </parameters>
    </task>

    <task name="is.localdb.attached">
      <description>
        checks whether accesserver and diagswdlsession are attached or not.
        global property ¤{localdb.is.attached} is used!
      </description>
      <dependencies list="SetKeepLocalDbFalse"/>
      <subtasks filename="vida.is.localdb.attached.xml">
      </subtasks>
    </task>

  
    <task name="attach.from.vidasave" condition="¤{localdb.is.attached}=false">
      <description>
        if localdb is not attached then try to attach databases from the
        vidasave directory
      </description>
      <dependencies list="is.localdb.attached"/>
      <subtasks filename="vida.attach.from.vidasave.xml"/>
    </task>

    <task name="get.installed.version" condition="¤{localdb.is.attached}=true">
      <description>
        local db is attached. Check version.
      </description>
      <dependencies list="attach.from.vidasave,is.localdb.attached"/>
      <subtasks filename="vida.get.installed.version.xml"/>
    </task>
    
  </tasks>
	
</taskrunner>
